package com.act.demo.acitivitim4.taskhandler.impl;

import com.act.demo.acitivitim4.enums.TaskEnum;
import com.act.demo.acitivitim4.taskhandler.CompleteReviewTaskHandler;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.Map;

/**
 * @description: 老师审核完成业务处理
 * @author: liujin
 * @create: 2020-06-18 11:42
 */
@Slf4j
@Component
public class TeacherReviewTaskHandler implements CompleteReviewTaskHandler {

    @Override
    public TaskEnum getTaskEnum() {
        return TaskEnum.TEACHER_REVIEW;
    }

    @Override
    public void handler(@NotEmpty String processInstanceId, @NotNull TaskEnum taskEnum, boolean passFlag, String comment, Map<String, Object> variables) {
        log.info("processInstanceId {}, taskEnum {}, passFlag {}, comment {}", processInstanceId, taskEnum, passFlag, comment);
        log.info("老师审核完成,打电话通知学生和家长");
    }
}

